package com.itheima.d6_abstract;

public class GoldenCard extends Card{
    @Override
    public void pay(double oilPrice) {
        System.out.println("当前余额:"+getMoney());
        System.out.println("当前消费油价:"+oilPrice);
        double payMoney = oilPrice * 0.8;
        System.out.println("金卡用户8折后消费:"+payMoney);
        setMoney(getMoney()-payMoney);
        System.out.println("余额:"+getMoney());
    }
}
